forked from Uniffi-Dart/uniffi-dart
-
Notifications
You must be signed in to change notification settings - Fork 2
Fix string interpolation in genco quote macro #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
benalleng
wants to merge
21
commits into
spacebear21:upgrading-to-0.29
Choose a base branch
from
benalleng:clone-pointer-error
base: upgrading-to-0.29
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix string interpolation in genco quote macro #4
benalleng
wants to merge
21
commits into
spacebear21:upgrading-to-0.29
from
benalleng:clone-pointer-error
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Just upgrade the version and break things
It was removed in uniffi 0.29 per mozilla/uniffi-rs#2387.
Type alias the custom type to the builtin type. Co-authored-by: Johnosezele <johnosezele@gmail.com>
There is an outstanding TODO in primitives.rs to "implement BytesCodeType" and some other TODOs in the associated macro, those probably need to be addressed.
Write distinct namespaces to their respective files. Implement imports rendering to auto-import modules for external types.
Implement the missing methods necessary to traverse the FFI layer for uniffi Objects, which under the hood are just pointers to an address in memory.
The BytesCodeType macro block is moved to the top because Rust macros match patterns in the order they are defined. More specific macros need to come before general ones.
Previously unnamed tuple variants would generate fields with the empty string as a name, as in: class V2ReceiverException extends ReceiverException { final SessionError ; V2ReceiverException(this.,); V2ReceiverException._(this.,); // ... } This fix follows the approach from https://github.com/mozilla/uniffi-rs/blob/1d412109db2b29c44b80231a8438014236935127/uniffi_bindgen/src/bindings/kotlin/templates/macros.kt#L136 with a helper function that uses tuple indices when the field.name() is empty. The helper functions replace "Error" with "Exception" to abide by DartCodeOracle::class_name. The constructor parameters now also use static typing. Co-authored-by: benalleng <benalleng@gmail.com>
This adds support for Foreign Trait objects.
When $inner_cl_converter_name.read returns a non-nullable inner type, it needs to be explicitly type-annotated to a nullable type for the Optional wrapper return value.
RustBuffer is defined independently in each file, which causes type mismatches when using a RustBuffer type from a different namespace. To fix this, each external namespace is now imported twice: once without an alias and a second time with a library prefix. This allows us to handle prefix external `RustBuffer`s with the corresponding library name, without having to prefix every other external type.
Solves the persistent issue where callback interface implementations require manual initialize() calls even when extending/implementing abstract classes.
Linux is more restrictive with dynamic library loading and doesn't search the current path when only a filename is provided.
Callers may need to construct Record types to use e.g. as argument to a relevant function.
reduce() doesn't work on empty sequences, but fold() does.
The quote macro requires some special syntax for string interpolation that this PR adds.
c8b2fe6
to
4edd627
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The quote macro requires some special syntax for string interpolation that this PR adds.